package com.example.service;

import com.example.entity.SysLogBO;
import com.example.mapper.SysLogBoMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
public class SysLogBoService {
    @Autowired
    private SysLogBoMapper sysLogBoMapper;

    @Transactional
    public boolean save(SysLogBO sysLogBO) {
        log.info(sysLogBO.getParams());
        if (Strings.isBlank(sysLogBO.getRemark())){
            sysLogBO.setRemark("统一处理");
        }
        sysLogBoMapper.add(sysLogBO);
        return true;
    }
}
